package leetcode.n2021;

/**
 * https://leetcode-cn.com/problems/palindrome-number/
 * @author Chaos
 * @date 2021/5/21
 */
public class PalindromeNumber {

    public static void main(String[] args) {
        PalindromeNumber palindromeNumber = new PalindromeNumber();
        System.out.println(palindromeNumber.test(-151));
    }


    public boolean test(int x) {
        StringBuilder sb1 = new StringBuilder(""+x);
        if (sb1.toString().equals(sb1.reverse().toString())) {
            return true;
        } else {
            return false;
        }

    }
}
